// const jsonCodeConfig = window._jsonCodeConfig;
const _jsonCode = window._jsonCode
export default {
  data() {
    return {
      plugins_met_unit_type: _jsonCode.PLUGINS_MET_UNIT_TYPE,
      PLUGINS_MET_LP_GRADE: _jsonCode.PLUGINS_MET_LP_GRADE,
      PLUGINS_MET_UNIT_CHECK_TYPE: _jsonCode.PLUGINS_MET_UNIT_CHECK_TYPE,  // 单位防雷检查类型
      PLUGINS_MET_REMIND_TYPE: _jsonCode.PLUGINS_MET_REMIND_TYPE, // 检查提醒
      PLUGINS_MET_TESTING_REPORT_CYCLE: _jsonCode.PLUGINS_MET_TESTING_REPORT_CYCLE, // 报告有效期
      PLUGINS_MET_INSPECT_STATUS: _jsonCode.PLUGINS_MET_INSPECT_STATUS, // 检查状态
      ONLINE_STATUS: _jsonCode.ONLINE_STATUS,  // 在线状态
      PLUGINS_MET_UPLOAD_STATUS: _jsonCode.PLUGINS_MET_UPLOAD_STATUS,  // 是否上传
      PLUGINS_MET_QUALIFIED_GRADE: _jsonCode.PLUGINS_MET_QUALIFIED_GRADE, // 资质
    }
  },
  methods: {
    doMonth(v) {
      if (v) {
        let newTime = ""
        const arr = v.split("-")
        let year = arr[0]
        let month = arr[1] * 1 + 6
        const day = arr[2]
        if (month < 13) {
          newTime = year + "-" + month + "-" + day
        } else {
          year = year * 1 + 1
          month = month * 1 - 12
          newTime = year + "-" + month + "-" + day
        }
        return newTime
      }
    },
  },
}
